package no.hio.wsclient.dao;

import java.util.List;
import java.util.NoSuchElementException;

import no.hio.wsclient.vo.ProductStock;
import no.hio.wsproviderproduct.Product;


/**
 * Interface for productDAO.
 * @author andreas
 *
 */
public interface ProductStockDAO{

	/**
	 * @return All products in datasource
	 */
	public List<ProductStock> findAllProducts();

	/**
	 * @param productID
	 * @return
	 */
	public ProductStock findByProductID(int productID);
	
	/**
	 * @param product
	 * @return Product ID of newly inserted product
	 * @throws UnsupportedOperationException
	 */
	public int insertProduct(ProductStock product) throws UnsupportedOperationException;
	
	/**
	 * @param product
	 * @throws NoSuchElementException
	 */
	public void removeProduct(ProductStock product) throws NoSuchElementException;
	
	/**
	 * @param product
	 * @throws NoSuchElementException
	 */
	public void updateProduct(ProductStock product) throws NoSuchElementException;

	public void setProductDAO(ProductDAO mockProdDAO);

	public void setStockItemDAO(StockItemDAO mockStockIDAO);


}